package ArrayListExercise;

public class Test{
    public static void main(String[] args) {
        MyArrayList myArrayList=new MyArrayList();
        System.out.println("====add()======↓");
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();
        System.out.println("====add(int pos,int data)=====↓");
        myArrayList.add(3,4);
        myArrayList.display();
        System.out.println("====contains(int data)=====↓");
        System.out.println(myArrayList.contains(2));
        System.out.println(myArrayList.contains(100));
        System.out.println("====indexOf(int data)=====↓");
        System.out.println(myArrayList.indexOf(2));
        System.out.println("====get(int pos)=====↓");
        System.out.println(myArrayList.get(3));
        System.out.println("====set(int pos,int value)=====↓");
        myArrayList.set(3,100);
        myArrayList.display();
        System.out.println("====remove(int toRemove)=====↓");
        myArrayList.remove(100);
        myArrayList.display();
        System.out.println("====size()=====↓");
        System.out.println(myArrayList.size());
        System.out.println("====clear()=====↓");
        myArrayList.clear();

    }
}